<?php
class Cal_Day_Container {
    private $day_container;
    private $day_num;
    private $cleardiv;
    private $day_slots;
    function __construct($day, $month, $year, $available, $url, $disabled = "no") {
        $this->day_container = new Div_Container("class", "day_container day_white");
        $this->day_num = new Div_Container('class', 'day_number');
        $this->cleardiv = new Div_Container('class', 'cleardiv');
        $this->day_slots = new Div_Container('class', 'day_slots');
        //$this->div->addContent('<a href="'.$url.'" style="cursor:pointer" year="'. $year . '" month="'. $month. '" day="'. $day.'" popup="1" over="0">');
        if($disabled == "no")
        {$this->day_container->addContent('<a href="'.$url.'" style="cursor:pointer">');}
        $this->day_num->addContent($day);
        if($disabled == "no"){
            $this->day_slots->addContent('Available: '. $available);
        }
        else{
            $this->day_slots->addContent('<span style="color:#e02626">Not Available</span>');
        }
        
        $this->day_container->addContent($this->day_num->toString() . $this->cleardiv->toString() . $this->day_slots->toString());
        
        
        if($disabled == "no"){$this->day_container->addContent('</a>');}
                
        
    }
    
    public function addContent($str)
    {
        $this->day_container->addContent($str);
    }

    public function toString() {
        
        return $this->day_container->toString();
        
    }
}

?>




        